﻿using System;
using UnityEngine;

namespace RuntimeGizmos
{
	// Token: 0x02000163 RID: 355
	public static class ExtVector3
	{
		// Token: 0x06000680 RID: 1664 RVA: 0x000385A1 File Offset: 0x000367A1
		public static float MagnitudeInDirection(Vector3 vector, Vector3 direction, bool normalizeParameters = true)
		{
			if (normalizeParameters)
			{
				direction.Normalize();
			}
			return Vector3.Dot(vector, direction);
		}

		// Token: 0x06000681 RID: 1665 RVA: 0x000385B7 File Offset: 0x000367B7
		public static Vector3 Abs(this Vector3 vector)
		{
			return new Vector3(Mathf.Abs(vector.x), Mathf.Abs(vector.y), Mathf.Abs(vector.z));
		}

		// Token: 0x06000682 RID: 1666 RVA: 0x000385E4 File Offset: 0x000367E4
		public static bool IsParallel(Vector3 direction, Vector3 otherDirection, float precision = 0.0001f)
		{
			return Vector3.Cross(direction, otherDirection).sqrMagnitude < precision;
		}

		// Token: 0x06000683 RID: 1667 RVA: 0x00038603 File Offset: 0x00036803
		public static bool IsInDirection(Vector3 direction, Vector3 otherDirection)
		{
			return Vector3.Dot(direction, otherDirection) > 0f;
		}
	}
}
